﻿using System;
using UnityEngine;

namespace SA
{
	// Token: 0x020001B9 RID: 441
	public abstract class FullBodyIKBehaviourBase : MonoBehaviour
	{
		// Token: 0x1700013C RID: 316
		// (get) Token: 0x060008D6 RID: 2262
		public abstract FullBodyIK fullBodyIK { get; }

		// Token: 0x060008D7 RID: 2263 RVA: 0x00053B6B File Offset: 0x00051D6B
		public virtual void Prefix()
		{
			if (this._cache_fullBodyIK == null)
			{
				this._cache_fullBodyIK = this.fullBodyIK;
			}
			if (this._cache_fullBodyIK != null)
			{
				this._cache_fullBodyIK.Prefix(base.transform);
			}
		}

		// Token: 0x060008D8 RID: 2264 RVA: 0x00053BA0 File Offset: 0x00051DA0
		protected virtual void Awake()
		{
			if (this._cache_fullBodyIK == null)
			{
				this._cache_fullBodyIK = this.fullBodyIK;
			}
			if (this._cache_fullBodyIK != null)
			{
				this._cache_fullBodyIK.Awake(base.transform);
			}
		}

		// Token: 0x060008D9 RID: 2265 RVA: 0x00053BD5 File Offset: 0x00051DD5
		protected virtual void OnDestroy()
		{
			if (this._cache_fullBodyIK == null)
			{
				this._cache_fullBodyIK = this.fullBodyIK;
			}
			if (this._cache_fullBodyIK != null)
			{
				this._cache_fullBodyIK.Destroy();
			}
		}

		// Token: 0x060008DA RID: 2266 RVA: 0x00053C04 File Offset: 0x00051E04
		protected virtual void LateUpdate()
		{
			if (this._cache_fullBodyIK == null)
			{
				this._cache_fullBodyIK = this.fullBodyIK;
			}
			if (this._cache_fullBodyIK != null)
			{
				this._cache_fullBodyIK.Update();
			}
		}

		// Token: 0x04000EA6 RID: 3750
		[NonSerialized]
		private FullBodyIK _cache_fullBodyIK;
	}
}
